package com.csx.orm.mybatis.mapper;

import com.csx.orm.mybatis.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {

    List<User> getAllUsers();

    User getUserById(Long id);

    void createUser(User user);

    void updateUser(User user);

    void deleteUser(Long id);

    List<User> getUsersByCondition(User userCondition);

    List<User> getUsersUseTrim(User user);

    List<User> getUsersUseChoose(User user);

    List<User> getUsersUseForeach(@Param("ids") List<Long> ids);

    List<User> getUsersUseBind(User user);

    List<User> getUsersUseSql();

    List<User> getUsersByConditionSql(User user);

    void updateUserUseSet(User user);

    void updateUserUseTrim(User user);

    List<User> findUsersResultMapNoArgs();

    List<User> findUsersResultMapArgs();

    List<User> findUsersResultMapQuote();

    List<User> findUserResultMapExtends();

    List<User> findUserResultMapDiscriminator();

}
